.class public Lcom/adview/adapters/MobiSageAdapter;
.super Lcom/adview/adapters/AdViewAdapter;
.source "MobiSageAdapter.java"

# interfaces
.implements Lcom/mobisage/android/IMobiSageAdViewListener;


# instance fields
.field private adv:Lcom/mobisage/android/MobiSageAdBanner;


# direct methods
.method public constructor <init>(Lcom/adview/AdViewLayout;Lcom/adview/obj/Ration;)V
    .locals 0
    .parameter "adViewLayout"
    .parameter "ration"

    .prologue
    .line 22
    invoke-direct {p0, p1, p2}, Lcom/adview/adapters/AdViewAdapter;-><init>(Lcom/adview/AdViewLayout;Lcom/adview/obj/Ration;)V

    .line 24
    return-void
.end method


# virtual methods
.method public handle()V
    .locals 6

    .prologue
    const/4 v4, 0x0

    .line 30
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v2

    sget-object v3, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v2, v3, :cond_0

    .line 31
    const-string v2, "AdView SDK v1.7.0"

    const-string v3, "Into MobiSage"

    invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 32
    :cond_0
    iget-object v2, p0, Lcom/adview/adapters/MobiSageAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v2}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/adview/AdViewLayout;

    .line 33
    .local v1, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v1, :cond_2

    .line 50
    :cond_1
    :goto_0
    return-void

    .line 37
    :cond_2
    iget-object v2, v1, Lcom/adview/AdViewLayout;->activityReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v2}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/Activity;

    .line 38
    .local v0, activity:Landroid/app/Activity;
    if-eqz v0, :cond_1

    .line 42
    new-instance v2, Lcom/mobisage/android/MobiSageAdBanner;

    iget-object v3, p0, Lcom/adview/adapters/MobiSageAdapter;->ration:Lcom/adview/obj/Ration;

    iget-object v3, v3, Lcom/adview/obj/Ration;->key:Ljava/lang/String;

    invoke-direct {v2, v0, v3, v4, v4}, Lcom/mobisage/android/MobiSageAdBanner;-><init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    iput-object v2, p0, Lcom/adview/adapters/MobiSageAdapter;->adv:Lcom/mobisage/android/MobiSageAdBanner;

    .line 43
    iget-object v2, p0, Lcom/adview/adapters/MobiSageAdapter;->adv:Lcom/mobisage/android/MobiSageAdBanner;

    const/4 v3, 0x0

    invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/mobisage/android/MobiSageAdBanner;->setAdRefreshInterval(Ljava/lang/Integer;)V

    .line 44
    iget-object v2, p0, Lcom/adview/adapters/MobiSageAdapter;->adv:Lcom/mobisage/android/MobiSageAdBanner;

    const/16 v3, 0x43

    invoke-virtual {v2, v3}, Lcom/mobisage/android/MobiSageAdBanner;->setAnimeType(I)V

    .line 45
    iget-object v2, p0, Lcom/adview/adapters/MobiSageAdapter;->adv:Lcom/mobisage/android/MobiSageAdBanner;

    invoke-virtual {v2, p0}, Lcom/mobisage/android/MobiSageAdBanner;->setMobiSageAdViewListener(Lcom/mobisage/android/IMobiSageAdViewListener;)V

    .line 47
    invoke-virtual {v1}, Lcom/adview/AdViewLayout;->removeAllViews()V

    .line 48
    iget-object v2, p0, Lcom/adview/adapters/MobiSageAdapter;->adv:Lcom/mobisage/android/MobiSageAdBanner;

    new-instance v3, Landroid/widget/RelativeLayout$LayoutParams;

    const/4 v4, -0x1

    const/4 v5, -0x2

    invoke-direct {v3, v4, v5}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v1, v2, v3}, Lcom/adview/AdViewLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 49
    invoke-virtual {v1}, Lcom/adview/AdViewLayout;->rotateThreadedDelayed()V

    goto :goto_0
.end method

.method public onMobiSageAdViewHide(Ljava/lang/Object;)V
    .locals 2
    .parameter "adView"

    .prologue
    .line 69
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v0

    sget-object v1, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v0, v1, :cond_0

    .line 70
    const-string v0, "AdView SDK v1.7.0"

    const-string v1, "onMobiSageAdViewHide"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 71
    :cond_0
    return-void
.end method

.method public onMobiSageAdViewShow(Ljava/lang/Object;)V
    .locals 3
    .parameter "adView"

    .prologue
    .line 53
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v1

    sget-object v2, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v1, v2, :cond_0

    .line 54
    const-string v1, "AdView SDK v1.7.0"

    const-string v2, "onMobiSageAdViewShow"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 56
    :cond_0
    iget-object v1, p0, Lcom/adview/adapters/MobiSageAdapter;->adViewLayoutReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v1}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/adview/AdViewLayout;

    .line 57
    .local v0, adViewLayout:Lcom/adview/AdViewLayout;
    if-nez v0, :cond_1

    .line 61
    :goto_0
    return-void

    .line 60
    :cond_1
    invoke-virtual {v0}, Lcom/adview/AdViewLayout;->reportImpression()V

    goto :goto_0
.end method

.method public onMobiSageAdViewUpdate(Ljava/lang/Object;)V
    .locals 2
    .parameter "adView"

    .prologue
    .line 64
    invoke-static {}, Lcom/adview/AdViewTargeting;->getRunMode()Lcom/adview/AdViewTargeting$RunMode;

    move-result-object v0

    sget-object v1, Lcom/adview/AdViewTargeting$RunMode;->TEST:Lcom/adview/AdViewTargeting$RunMode;

    if-ne v0, v1, :cond_0

    .line 65
    const-string v0, "AdView SDK v1.7.0"

    const-string v1, "onMobiSageAdViewUpdate"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 66
    :cond_0
    return-void
.end method
